<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>" target="_blank">
    <title>骑驴网，打造中国最专业的职场交流中心</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="职场  公司 评论 薪水">
	<meta http-equiv="description" content="中国最专业的职场交流中心">
	<link rel="icon" href="favicon.ico" type="image/x-icon"/>
	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
	<link rel="stylesheet" type="text/css" href="css/main.css">
	<link rel="stylesheet" type="text/css" href="css/comm.css">
	<style type="text/css">
	body {
		color: #333;
	}
	img {
		margin: 0px;
		vertical-align: top;
	}
	#divtab {
		width: 100%;
		margin: 0px;
		height: 25px;
		line-height:25px;
		background-image: url("images/theme_blue.png");
		background-position: 0 -30;
		background-color: #E9EFF6;
		background-repeat: repeat-x;
	}
	#divtab a {
		color: #1E50A2;
		text-decoration: none;
	}
	#divtab ul {
		list-style:none;
		margin:0px;
		padding:0px;
	}
	#divtab li {
		padding:0px 8px;
		margin:0px;
		font-size:14px;
		line-height: 25px;
		display:inline;
		height:25px;
		border-right:1px solid #B1C8D7;
		float: left;
		cursor:pointer;
	}
	#nav {
		float:right;
		width:600px;
		color:#555;
	}
	#nav a {
		color:#666;
		text-decoration: none;
	}
	#nav a:hover {
		text-decoration: underline;
	}
	</style>
</head>

<body>
<%@include file="header.jsp" %>
<center>
<div class="main">
<%-- ################################################# 搜索框 --%>
<div class="search">
	<div style="float:left;">
		<script type="text/javascript">
			var rd = new Date().getTime() % 12;
			document.write('<img alt="骑驴网" src="images/logo/logo'+ rd +'.gif">');
		</script>
	</div>
	<div id="nav">
		<div style="border:1px solid #B1C8D7;height:40px;margin-top:4px;padding:3px;">
			<div style="padding:3px;">公司：
				<a href="company.html?method=getAllHotCompany">热门公司</a>
				<a href="company.html?method=getAllNewCompany">最新发布公司 </a>
				<a href="company.html?method=getAllGoodCompany">好评公司</a>
				<a href="company.html?method=getAllBadCompany">差评公司</a>
				职场：
				<a href="article.html?method=getArticleByPage&atype=3">职场健康 </a>
				<a href="article.html?method=getArticleByPage&atype=2">职场法律 </a>
				<a href="article.html?method=getArticleByPage&atype=4">职场英语 </a>
				<a href="article.html?method=getArticleByPage&atype=1">职场测试</a>
			</div>
			<div style="padding:3px;">新闻：
				<a href="pages/news/newspagelist.jsp?topic=h"> 热门新闻</a>
				<a href="pages/news/newspagelist.jsp?topic=w"> 国际新闻</a>
				<a href="pages/news/newspagelist.jsp?topic=n"> 国内新闻</a>
				<a href="pages/news/newspagelist.jsp?topic=t"> 电脑科技</a>
				<a href="pages/news/newspagelist.jsp?topic=s"> 体育新闻</a>
				<a href="pages/news/newspagelist.jsp?topic=m"> 健康健身</a>
				<a href="pages/news/newspagelist.jsp?topic=p"> 国家政策</a>
				<a href="pages/news/newspagelist.jsp?topic=e"> 娱乐新闻</a>
				<a href="pages/news/newspagelist.jsp?topic=b"> 财经新闻</a>
				 </div>
		</div>
		<form action="company.html" style="margin:0px;padding:0px;margin-top:3px;" method="get" onsubmit="findCompa(this.name.value);return false;">
			<input type="hidden" name="method" value="findCompany">
			<input type="text" style="border:1px solid #C1C1C1;height:20px;background:url(images/dot6.gif) no-repeat;padding-left:28px;" name="name" class="findInput">&nbsp;<input style="border:1px solid #c6c6c6;background-color:#f2f2f2;color:#646464;height:20px;" type="submit" value="搜索公司">
			<input type="button" style="border:1px solid #c6c6c6;background-color:#f2f2f2;color:#646464;height:20px;" onclick="open('pages/company/addcompany.jsp', '', '');" value="发布公司">
		</form>
		<p style="margin:0px;margin-top:3px;text-decoration:none;color:#BA2636;">
		<img src="images/light.gif">
		热门关键字：<span id="findkeyword"><img src="images/icon/loading.gif"></span></p>
	</div>
</div>
<%-- ################################################# 网站内容面板 --%>
<script type="text/javascript">
	function do1(obj) {
		obj.style.backgroundColor='white';
		obj.style.color='#369';
	}
	function do2(obj) {
		obj.style.backgroundColor='#369';
		obj.style.color='white';
	}
	function do3(url) {
		window.open("<%=basePath%>" + url, "", "");
	}
</script>
<div id="mainMenu">
	<ul>
		<li onclick="do3('pages/news/main.jsp')" onmousemove="do1(this);" onmouseout="do2(this);">新闻频道</li>
		<li onclick="do3('company.html?method=getAllNewCompany');" onmousemove="do1(this);" onmouseout="do2(this);">最新发布公司</li>
		<li onclick="do3('company.html?method=getAllHotCompany')" onmousemove="do1(this);" onmouseout="do2(this);">热门评论公司</li>
		<li style="margin:0px;padding:0px;"><img src="images/hot.gif"></li>
		<li onclick="do3('company.html?method=getAllGoodCompany')" onmousemove="do1(this);" onmouseout="do2(this);">好评公司</li>
		<li onclick="do3('company.html?method=getAllBadCompany')" onmousemove="do1(this);" onmouseout="do2(this);">差评评公司</li>
		<li onclick="do3('article.html?method=getArticleByPage&atype=3')" onmousemove="do1(this);" onmouseout="do2(this);">职场健康</li>
		<li onclick="do3('article.html?method=getArticleByPage&atype=2')" onmousemove="do1(this);" onmouseout="do2(this);">职场法案</li>
		<li onclick="do3('article.html?method=getArticleByPage&atype=4')" onmousemove="do1(this);" onmouseout="do2(this);">职场英语</li>
		<li onclick="do3('article.html?method=getArticleByPage&atype=1')" onmousemove="do1(this);" onmouseout="do2(this);">职场测试</li>
		<li style="margin:0px;padding:0px;"><img src="images/hot.gif"></li>
	</ul>
</div>
<!-- 广告 -->
<div style="width:976px;overflow:hidden;margin-top:3px;clear:both;display:none;height:30px;">
	<img alt="banner image" src="images/banner3.gif" style="width:100%;">
</div>
<div class="content">
<div style="width:790px;height:auto;margin:0px;">
	<div class="leftContent">
	<div id="divtab">
		<ul>
		<li id="tab11" class="selectLi"><a href="javascript:;" target="_self">最新发布的公司</a></li>
		<li id="tab12"><a href="javascript:;" target="_self">热评公司</a></li>
		<li id="tab13"><a href="javascript:;" target="_self">好评公司</a></li>
		<li id="tab14"><a href="javascript:;" target="_self">差评公司</a></li>
		</ul>
	</div>
	<div id="tabDiv11"><img src="images/icon/loading.gif">正在加载数据...</div>
	<div id="tabDiv12" style="display:none;"><img src="images/icon/loading.gif"><img src="images/icon/loading.gif">正在加载数据...</div>
	<div id="tabDiv13" style="display:none;"><img src="images/icon/loading.gif"><img src="images/icon/loading.gif">正在加载数据...</div>
	<div id="tabDiv14" style="display:none;"><img src="images/icon/loading.gif"><img src="images/icon/loading.gif">正在加载数据...</div>
	</div>
	<div class="leftContent">
	<div id="divtab">
		<ul>
		<li class="selectLi" id="tab21"><a href="javascript:;" target="_self">职场健康</a></li>
		<li id="tab22"><a href="javascript:;" target="_self">职场法律</a></li>
		<li id="tab23"><a href="javascript:;" target="_self">职场英语</a></li>
		<li id="tab24"><a href="javascript:;" target="_self">职场测试</a></li>
		</ul>
	</div>
	<div id="tabDiv21"><img src="images/icon/loading.gif">正在加载数据...</div>
	<div id="tabDiv22" style="display:none;"><img src="images/icon/loading.gif"><img src="images/icon/loading.gif">正在加载数据...</div>
	<div id="tabDiv23" style="display:none;"><img src="images/icon/loading.gif"><img src="images/icon/loading.gif">正在加载数据...</div>
	<div id="tabDiv24" style="display:none;"><img src="images/icon/loading.gif"><img src="images/icon/loading.gif">正在加载数据...</div>
	</div>
	
	<%--主页中正中间的广告条
	<div class="leftContent" style="width:99%;height:auto;border:0;">
		<img src="images/banner2.jpg" style="width:100%;height:auto;border:0;">
	</div>
	 --%>
	
	<div class="leftContent" style="overflow: hidden;">
		<div id="divtab">
			<ul>
			<li class="selectLi" id="tab31"><a href="javascript:;" target="_self">国际新闻</a></li>
			<li id="tab32"><a href="javascript:;" target="_self">国内新闻</a></li>
			<li id="tab33"><a href="javascript:;" target="_self">国家政策</a></li>
			<li id="tab34"><a href="javascript:;" target="_self">财经新闻</a></li>
			</ul>
		</div>
		<div id="tabDiv31" style="background-color:#FFF;"><img src="images/icon/loading.gif">数据采集中...</div>
		<div id="tabDiv32" style="display:none;"><img src="images/icon/loading.gif">数据采集中...</div>
		<div id="tabDiv33" style="display:none;"><img src="images/icon/loading.gif">数据采集中...</div>
		<div id="tabDiv34" style="display:none;"><img src="images/icon/loading.gif">数据采集中...</div>
	</div>
	
	<div class="leftContent" style="overflow: hidden;">
		<div id="divtab">
			<ul>
			<li class="selectLi" id="tab41"><a href="javascript:;" target="_self">体育新闻</a></li>
			<li id="tab42"><a href="javascript:;" target="_self">娱乐新闻</a></li>
			<li id="tab43"><a href="javascript:;" target="_self">健康保健</a></li>
			<li id="tab44"><a href="javascript:;" target="_self">电脑科技</a></li>
			</ul>
		</div>
		<div id="tabDiv41"><img src="images/icon/loading.gif">数据采集中...</div>
		<div id="tabDiv42" style="display:none;"><img src="images/icon/loading.gif">数据采集中...</div>
		<div id="tabDiv43" style="display:none;"><img src="images/icon/loading.gif">数据采集中...</div>
		<div id="tabDiv44" style="display:none;"><img src="images/icon/loading.gif">数据采集中...</div>
	</div>

	<%--
	<div class="leftContent" style="width:99%;background-color:#F7FAFC;display:inline;height:auto;">
		<div id="divtab" style="width:99%;font-weight:bold;font-size:14px;padding-left:10px;color:#1E50A2;">网友最新评论</div>
		<div id="tabDiv51" style="background-color:#F7FAFC;display:inline;height:auto;">数据加载中...</div>
	</div>
	 --%>
</div>
</div>
<div style="width:180px;height:auto;margin:0px;float:right;">
	<div class="rightContent">
		<object type="application/x-shockwave-flash" style="outline:none;" data="http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/turtle.swf?" width="180" height="150"><param name="movie" value="http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/turtle.swf?"></param><param name="AllowScriptAccess" value="always"></param><param name="wmode" value="opaque"></param><param name="scale" value="noscale"/><param name="salign" value="tl"/></object>
	</div>
	<div class="rightContent">
		<div id="divtab" style="color:#1E50A2;font-weight:bold;">
			<b><img src="images/light.gif">网友最新评论</b>
		</div>
		<div id="newComment" style="height:auto;background-color:#F7FAFC;width:100%;margin:0px;padding:0px;">
		<img src="images/icon/loading.gif">
		</div>
	</div>
	<%--
	<div class="rightContent">
		<div id="divtab" style="color:#1E50A2;font-weight:bold;">
			最近浏览过的公司
		</div>
		<div id="historyCompany" style="height:auto;background-color:#F7FAFC;width:100%;margin:0px;padding:0px;">
		</div>
	</div>
	
	<div class="rightContent" style="background-color:#F7FAFC;">
	<div id="divtab" style="color:#1E50A2;font-weight:bold;">
		热门关键词<img src="images/hot.gif">
	</div>
	<div id="hotKeywords" style="height:auto;width:95%;margin:0px;padding:4px;">
		<img src="images/icon/loading.gif">
	</div>
	</div>
	--%>
	
	<!-- 天气预报 -->
	<div class="rightContent">
		<div style="height:auto;width:100%;margin:0px;padding:0px;overflow:hidden;background-color:">
			<iframe src="http://www.thinkpage.cn/weather/weather.aspx?uid=&c=CHXX0099&l=zh-CHS&p=CMA&a=1&u=C&s=1&m=1&x=1&d=3&fc=&bgc=&bc=&ti=1&in=1&li=2&ct=iframe" frameborder="0" scrolling="no" width="180" height="260" allowTransparency="true"></iframe>
		</div>
	</div>
	<!-- <img src="images/ad/ad4.jpg" style="width:100%;height:auto;"> -->
	<div class="rightContent">
	<div id="divtab" style="color:#1E50A2;font-weight:bold;">
		广告推广
	</div>
	</div>
	<div class="rightContent" style="background-color:#F7FAFC;">
	<div id="divtab" style="color:#1E50A2;font-weight:bold;">
		骑驴公告
	</div>
	<div id="qilvbbs" style="height:auto;width:95%;margin:0px;padding:4px;">
	<img src="images/icon/loading.gif">
	</div>
	</div>
</div>
</div>
<%@include file="tailer.jsp" %>
</center>
</body>
<script type="text/javascript" src="js/javer.js"></script>
<script type="text/javascript" src="js/tabview.js"></script>
<script type="text/javascript" src="js/comm.js"></script>
<script type="text/javascript">
	$.tabView("tab11-tabDiv11,tab12-tabDiv12,tab13-tabDiv13,tab14-tabDiv14");
	$.tabView("tab21-tabDiv21,tab22-tabDiv22,tab23-tabDiv23,tab24-tabDiv24");
	$.tabView("tab31-tabDiv31,tab32-tabDiv32,tab33-tabDiv33,tab34-tabDiv34");
	$.tabView("tab41-tabDiv41,tab42-tabDiv42,tab43-tabDiv43,tab44-tabDiv44");
	
	$("tabDiv11").load("company.html?method=getNewCompany");
	$("tabDiv12").load("company.html?method=getHotCompany");
	$("tabDiv13").load("company.html?method=getGoodCompany");
	$("tabDiv14").load("company.html?method=getBadCompany");
	
	$("tabDiv21").load("article.html?method=getNewArticle&atype=3");
	$("tabDiv22").load("article.html?method=getNewArticle&atype=2");
	$("tabDiv23").load("article.html?method=getNewArticle&atype=4");
	$("tabDiv24").load("article.html?method=getNewArticle&atype=1");
	
	// 最新评论
	$("newComment").load("company.html?method=getNewComment");
	
	// 热门关键字
	$("findkeyword").load("company.html?method=getHotCompanyKeywords&limit=8");
	
	// 热门关键字
	//$("hotKeywords").load("company.html?method=getHotCompanyKeywords&rightPanel=1");

	// 骑驴公告
	$("qilvbbs").load("article.html?method=getNewArticle&atype=5");
	
	// 显示历史浏览公司
	/*var his = $.Cookies.get("companyHistory");
	if (his) {
		var hises = his.split(",");
		var content = '<ul class="historyUl">';
		for (var i = hises.length-1; i >= 0; i--) {
			var compa = hises[i].split("-");
			content += '<li class="historyLi"><a class="historyHref" href="company.html?method=showCompany&id='+ compa[0] +'">'+ compa[1] +'</a></li>'
			
		}
		content += "</ul>";
		$("historyCompany").html(content);
	}*/
	
	// Google 新闻
	
	// RFC #822 DATE AND TIME SPECIFICATION
	var month = {
		 "Jan": "1",
		 "Feb": "2",
		 "Mar": "3",
		 "Apr": "4",
         "May": "5",
         "Jun": "6",
         "Jul": "7",
         "Aug": "8",
         "Sep": "9",
         "Oct": "10",
         "Nov": "11",
         "Dec": "12"
	};
	
	function createNewItem(res) {
		var r = res.responseData.results;
		var dis = "<ul class='newsUL'><li style='height:8px;'></li>";
		for (var i = 0; i < r.length; i++) {
			var publishDate = r[i].publishedDate; // Wed, 27 Jul 2011 19:24:01 -0700
			publishDate = parseDate(publishDate);
			dis += "<li class='newsLI'><a href="+ r[i].unescapedUrl +" title="+ r[i].title +">"+ r[i].title.substring(0,20) +"</a>  "+ publishDate +"<p>"
				+ r[i].content.substring(0,75) +" ("+ r[i].publisher +")</p>";
			
			if (i < r.length -1) {
				dis += "<p style='padding:0px;margin:4px;border:0px;border-top:1px dashed #DDD;'></p>";
			}
			dis += "</li>";
		}
		dis += "</ul>";
		return dis;
	}
	function parseDate(date) {
		var ts = date.split(" ");
		var res = month[ts[2]] + "月" + ts[1] + "日 ";// + ts[4];
		return res;
	}

	function doWorldNews(res) {
		$("tabDiv31").html(createNewItem(res));
	}
	function doNationNews(res) {
		$("tabDiv32").html(createNewItem(res));
	}
	function doPoliticNews(res) {
		$("tabDiv33").html(createNewItem(res));
	}
	function doSportNews(res) {
		$("tabDiv41").html(createNewItem(res));
	}
	function doEntertNews(res) {
		$("tabDiv42").html(createNewItem(res));
	}
	function doHealNews(res) {
		$("tabDiv43").html(createNewItem(res));
	}
	function doBusinessNews(res) {
		$("tabDiv34").html(createNewItem(res));
	}
	function doTechNews(res) {
		$("tabDiv44").html(createNewItem(res));
	}
</script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=w&rsz=5&callback=doWorldNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=n&rsz=5&callback=doNationNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=p&rsz=5&callback=doPoliticNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=s&rsz=5&callback=doSportNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=e&rsz=5&callback=doEntertNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=m&rsz=5&callback=doHealNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=b&rsz=5&callback=doBusinessNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=t&rsz=5&callback=doTechNews&ned=cn"></script>
</html>
